cl__1 = 1e+022;
Point(1) = {0, -0.023, 0, cl__1};
Point(2) = {0.0233, -0.023, 0, cl__1};
Point(3) = {0.0233, 0.022, 0, cl__1};
Point(4) = {0.00155, 0.0078, 0, cl__1};
Point(5) = {0.0058, 0.0078, 0, cl__1};
Point(6) = {0.0058, 0.0195, 0, cl__1};
Point(7) = {0.0213, 0.0032, 0, cl__1};
Point(8) = {0.0213, -0.001, 0, cl__1};
Point(9) = {0.0213, -0.021, 0, cl__1};
Point(10) = {0.006, -0.021, 0, cl__1};
Point(11) = {0.006, -0.005, 0, cl__1};
Point(12) = {0.0063, -0.001, 0, cl__1};
Point(13) = {0.0194, -0.0202, 0, cl__1};
Point(14) = {0.0194, -0.0018, 0, cl__1};
Point(15) = {0.00125, -0.0047, 0, cl__1};
Point(16) = {0.0058, -0.0047, 0, cl__1};
Point(17) = {0, -0.005, 0, cl__1};
Point(18) = {0.0058, 0.0053, 0, cl__1};
Point(19) = {0.002, 0.0108, 0, cl__1};
Point(20) = {0.00155, 0.0108, 0, cl__1};
Point(21) = {0.0213, 0.0195, 0, cl__1};
Point(22) = {0.0025, 0.022, 0, cl__1};
Point(23) = {0.0025, 0.0195, 0, cl__1};
Point(24) = {0.002, 0.0195, 0, cl__1};
Point(25) = {0.0063, 0.0032, 0, cl__1}; 
Point(26) = {0.007, -0.0202, 0, cl__1};
Point(27) = {0.00125, 0.0053, 0, cl__1};
Point(28) = {0.007, 0.0184, 0, cl__1};
Point(29) = {0.007, 0.004, 0, cl__1};
Point(30) = {0.007, -0.0018, 0, cl__1};
Point(31) = {0.0198, 0.0184, 0, cl__1};
Point(32) = {0.0198, 0.004, 0, cl__1};

Point(33) = {0, 0.0078, 0, cl__1};
Point(34) = {0, 0, 0, cl__1};
Point(40) = {0, -50e-3, 0, cl__1};
Point(41) = {50e-3, 0, 0, cl__1};
Point(42) = {0, 50e-3, 0, cl__1};
Point(43) = {0, -60e-3, 0, cl__1};
Point(44) = {60e-3, 0, 0, cl__1};
Point(45) = {0, 60e-3, 0, cl__1};

Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 22};
Line(4) = {22, 23};
Line(5) = {23, 24};
Line(6) = {24, 19};
Line(7) = {19, 20};
Line(8) = {20, 4};
Line(9) = {4, 5};
Line(10) = {5, 6};
Line(11) = {6, 21};
Line(12) = {21, 7};
Line(13) = {7, 25};
Line(14) = {25, 12};
Line(15) = {12, 8};

Line(16) = {8, 9};
Line(17) = {9, 10};

Line(18) = {10, 11};
Line(19) = {11, 17};
Line(20) = {17, 1};


//+
Line(21) = {15, 16};
//+
Line(22) = {16, 18};
//+
Line(23) = {18, 27};
//+
Line(24) = {27, 15};
//+
Line(25) = {26, 13};
//+
Line(26) = {13, 14};
//+
Line(27) = {14, 30};
//+
Line(28) = {30, 26};
//+
Line(29) = {29, 32};
//+
Line(30) = {32, 31};
//+
Line(31) = {31, 28};
//+
Line(32) = {28, 29};
//+
Line(33) = {17, 33};
//+
Line(34) = {33, 4};
//+
Line(35) = {45, 42};
//+
Line(36) = {42, 33};
//+
Line(37) = {1, 40};
//+
Line(38) = {40, 43};
//+
Line(53) = {7, 8};
Circle (47) = {42, 34, 41} ;
Circle (49) = {43, 34, 44} ;
Circle (50) = {45, 34, 44} ;
Circle (51) = {40, 34, 41} ;
//+
Line(52) = {41, 44};
//+
Curve Loop(1) = {21, 22, 23, 24};
//+
Plane Surface(1) = {1};

//+
Curve Loop(2) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 53, 16, 17, 18, 19, 20};
//+
Plane Surface(2) = {2};
//+
Curve Loop(3) = {25, 26, 27, 28};
//+
Plane Surface(3) = {3};
//+
Curve Loop(4) = {15, -53, 13, 14};
//+
Plane Surface(4) = {4};
//+
Curve Loop(5) = {29, 30, 31, 32};
//+
Plane Surface(5) = {5};
//+
Curve Loop(6) = {52, -50, 35, 47};
//+
Plane Surface(6) = {6};
//+
Curve Loop(7) = {51, 52, -49, -38};
//+
Plane Surface(7) = {7};
//+
Curve Loop(8) = {51, -47, 36, 34, -8, -7, -6, -5, -4, -3, -2, -1, 37};
//+
Plane Surface(8) = {8};
//+
Curve Loop(9) = {19, 33, 34, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18};
//+
Plane Surface(9) = {1, 3, 5, 9};

lc = 1e-4;
// control mesh size
Field[1] = Distance;
//Field[1].NodesList = {5};
Field[1].NNodesByEdge = 80;
Field[1].EdgesList = {21,19,23,9};

Field[2] = Threshold;
Field[2].IField = 1;
Field[2].LcMin = lc*2;
Field[2].LcMax = 10;
Field[2].DistMin = lc*2;
Field[2].DistMax = 50;

Field[3] = Distance;
//Field[1].NodesList = {5};
Field[3].NNodesByEdge = 50;
Field[3].EdgesList = {3};

Field[4] = Threshold;
Field[4].IField = 3;
Field[4].LcMin = 0.2e-2;
Field[4].LcMax = 10e-3;
Field[4].DistMin = 1;
Field[4].DistMax = 30;

//Field[5] = Distance;
////Field[1].NodesList = {5};
//Field[5].NNodesByEdge = 25;
//Field[5].EdgesList = {44,47,48,49,50};
//
//Field[6] = Threshold;
//Field[6].IField = 5;
//Field[6].LcMin = 2;
//Field[6].LcMax = 5;
//Field[6].DistMin = 10;
//Field[6].DistMax = 20;

// Finally, let's use the minimum of all the fields as the background mesh field
Field[7] = Min;
Field[7].FieldsList = {2,4};

Background Field = 7;

Mesh.CharacteristicLengthExtendFromBoundary = 0;
Mesh.CharacteristicLengthFromPoints = 0;
Mesh.CharacteristicLengthFromCurvature = 0;

//Mesh.CharacteristicLengthExtendFromBoundary = 1;
//Mesh.CharacteristicLengthFactor = 1;
//Mesh.CharacteristicLengthMin = 0.01;
//Mesh.CharacteristicLengthMax = 50;
//Mesh.CharacteristicLengthFromCurvature = 0;
//Mesh.CharacteristicLengthFromPoints = 1;